<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%     
	String path = request.getContextPath();     
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";     
%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>修改</title>
    <base href="<%=basePath%>"/>
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script language="JavaScript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js" defer="defer"></script>	
    <style type="text/css">
  		fieldset,legend,form,table,tr,td,textarea{margin:0;padding:0}
  		form label {font-weight:bold;}
    	table{margin:10px 10px};
  		td{line-height: 40px;}
		input[type="text"]{width:250px;}
		input[type="password"]{width:250px;}
		input[type="textarea"]{width:250px;}
		select {width:100px;}
    </style>
    
	<script type="text/javascript">
	  $(document).ready(function(){
		  $("#btn_update").click(function(){
	        if(isEmpty($("#name").val())) { alert("名称不能为空！"); return; }
			$("#groupForm").submit();
	  	});
	  });
	  
	  function backList(){
	      location.href = "<%=basePath%>manage/etl?act=getPage";
		   }
	</script>    
  </head>
  
  <body>
  <div>
    <fieldset>
      <legend>修改EtlEntity：</legend>
     <form id="etlForm" method="post" action="<%=basePath%>manage/etl?act=update">
     	<input type="hidden" name="entityId" id="entityId" value="${entity.entityId }" />
      	<p id = "p_error" style = "margin:10px 10px;">
      	    <label id="error_label" style="color:red;"></label>
      	</p>
        <table>
          <tr>
            <td><label for="name">实例模式名：</label></td>
            <td>
            	<input type="text" name="entitySchema" id="entitySchema" value="${entity.entitySchema }" />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
            <td><label for="name">实例名：</label></td>
            <td>
            	<input type="text" name="entityName" id="entityName" value="${entity.entityName }" />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
            <td><label for="name">调度周期：</label></td>
            <td>
            	<select name="runCycle" id="runCycle" >
            		<option value="D" <c:if test="${entity.runCycle=='D' }">selected</c:if> >日</option>
            		<option value="M" <c:if test="${entity.runCycle=='M' }">selected</c:if> >月</option>
            		<option value="W" <c:if test="${entity.runCycle=='W' }">selected</c:if> >周</option>
            		<option value="S" <c:if test="${entity.runCycle=='S' }">selected</c:if> >季</option>
            		<option value="Y" <c:if test="${entity.runCycle=='Y' }">selected</c:if> >年</option>
            	</select>
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
         </tr>
         <tr>
            <td><label for="name">调度月份：</label></td>
            <td>
            	<input type="text" name="runMonth" id="runMonth" onfocus="WdatePicker({dateFmt:'MM'})" value="${entity.runMonth }" class="Wdate"  />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
            <td><label for="name">调度日期：</label></td>
            <td>
            	<input type="text" name="runDay" id="runDay" onfocus="WdatePicker({dateFmt:'dd'})"  value="${entity.runDay }" class="Wdate"  />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
            <td><label for="name">调度小时：</label></td>
            <td>
            	<input type="text" name="endHour" id="endHour" onfocus="WdatePicker({dateFmt:'HH'})"  value="${entity.endHour }" class="Wdate"  />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
         </tr>
         <tr>
            <td><label for="name">调度分钟：</label></td>
            <td>
            	<input type="text" name="runMinutes" id="runMinutes" onfocus="WdatePicker({dateFmt:'mm'})" value="${entity.runMinutes }" class="Wdate"  />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
	  		<td><label for="name">作者：</label></td>
            <td>
            	<input type="text" name="author" id="author" value="${entity.author }" />
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
            <td><label for="name">是否参与调度：</label></td>
            <td>
            	<select name="runEnable" id="runEnable">
            		<option value="0" <c:if test="${entity.runEnable==0 }">selected</c:if> >不参与</option>
            		<option value="1" <c:if test="${entity.runEnable==1 }">selected</c:if> >参与</option>
            	</select>
            	<font color="red">&nbsp;*&nbsp;&nbsp;</font>
            </td>
          	<td></td>
            <td>
            	<input type="submit" id="btn_insert"  value="提交 "  style="width:80px;" />
            	<input type="button" id="btn_back" value="返回" onclick="backList()" style="width:80px;" />
            </td>
          </tr>
        </table>
      </form>
    </fieldset>
  </div>    
  </body>
</html>